# Relies on the NETPBM tools, if you don't recognise them.
# Generated data just gets sent to stdout, where you'll cut&paste 
# into your assembler file.
# --
# Chris Baird,, <chris.j.baird@gmail> 2021

FOO=/tmp/$$.pnm

anytopnm Charset_4x6.png >$FOO

for y in `seq 0 6 11`
do
   for x in `seq 000 4 127`
   do
      pamcut <$FOO -left $x -top $y -width 4 -height 6 >chars_${c}.pnm
      c=$(( $c + 1))
   done
done

for i in chars_*
do
	pnmcat -leftright $i $i >C_$i
done

for i in C_chars_*
do 
	pamthreshold $i 2>/dev/null|pnmflip -lr|pamtopnm|pbmtoxbm
done|grep x

rm -f C_chars* chars_*

